#define layout(title)
<!DOCTYPE html>
<html>
<head>
  	<meta charset="utf-8">
  	<title>#(title) &lt; 测试 - Jwp</title>
  	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  	<link rel="stylesheet" href="/assets/layui/css/layui.css" media="all">
  	<link rel="stylesheet" href="/assets/admin/css/admin.css" media="all">
  	#@head?()
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
  		<div class="layui-header">
    		<div class="layui-logo">Jwp</div>
    		<!-- 头部区域（可配合layui已有的水平导航） -->
    		<ul class="layui-nav layui-layout-left">
      			<li class="layui-nav-item">
      				<a href=""><i class="layui-icon layui-icon-home"></i>测试</a>
      				<dl class="layui-nav-child">
      					<dd><a href="/">查看站点</a></dd>
        			</dl>
      			</li>
      			<li class="layui-nav-item"><a href=""><i class="layui-icon layui-icon-refresh"></i>更新</a></li>
      			<li class="layui-nav-item"><a href="/admin/comment"><i class="layui-icon layui-icon-chat"></i>评论</a></li>
      			<li class="layui-nav-item">
        			<a href="javascript:;"><i class="layui-icon layui-icon-add-1"></i>新建</a>
        			<dl class="layui-nav-child">
          				<dd><a href="/admin/post/create">文章</a></dd>
          				<dd><a href="/admin/attachment/create">媒体</a></dd>
          				<dd><a href="/admin/page/create">页面</a></dd>
          				<dd><a href="/admin/user/create">用户</a></dd>
        			</dl>
      			</li>
    		</ul>
    		<ul class="layui-nav layui-layout-right">
      			<li class="layui-nav-item">
        			<a href="javascript:;">
          				<img src="#(loginUser.simple_local_avatar??'/assets/admin/css/images/default_avatar.jpeg')" class="layui-nav-img">
          				#(loginUser.display_name??)
        			</a>
        			<dl class="layui-nav-child">
          				<dd><a href="/admin/profile">编辑我的个人资料</a></dd>
          				<dd><a href="/admin/logout">登出</a></dd>
        			</dl>
      			</li>
    		</ul>
  		</div>
  
  		<div class="layui-side layui-bg-black">
    		<div class="layui-side-scroll">
    			#switch(ACTION_KEY)
    				#case ("/admin")
    					#set(nav1 = "layui-nav-itemed")
    					#set(nav11 = "layui-this")
    				#case ("/admin/update")
    					#set(nav1 = "layui-nav-itemed")
    					#set(nav12 = "layui-this")
    				#case ("/admin/post")
    					#set(nav2 = "layui-nav-itemed")
    					#set(nav21 = "layui-this")
    				#case ("/admin/post/create")
    					#set(nav2 = "layui-nav-itemed")
    					#set(nav22 = "layui-this")
    				#case ("/admin/category")
    					#set(nav2 = "layui-nav-itemed")
    					#set(nav23 = "layui-this")
    				#case ("/admin/tag")
    					#set(nav2 = "layui-nav-itemed")
    					#set(nav24 = "layui-this")
    				#case ("/admin/attachment")
    					#set(nav3 = "layui-nav-itemed")
    					#set(nav31 = "layui-this")
    				#case ("/admin/attachment/create")
    					#set(nav3 = "layui-nav-itemed")
    					#set(nav32 = "layui-this")
    				#case ("/admin/page")
    					#set(nav4 = "layui-nav-itemed")
    					#set(nav41 = "layui-this")
    				#case ("/admin/page/create")
    					#set(nav4 = "layui-nav-itemed")
    					#set(nav42 = "layui-this")
    				#case ("/admin/comment")
    					#set(nav5 = "layui-nav-itemed")
    				#case ("/admin/theme")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav61 = "layui-this")
    				#case ("/admin/customize")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav62 = "layui-this")
    				#case ("/admin/widget")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav63 = "layui-this")
    				#case ("/admin/menu")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav64 = "layui-this")
    				#case ("/admin/theme/top")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav65 = "layui-this")
    				#case ("/admin/theme/edit")
    					#set(nav6 = "layui-nav-itemed")
    					#set(nav66 = "layui-this")
    				#case ("/admin/plugin")
    					#set(nav7 = "layui-nav-itemed")
    					#set(nav71 = "layui-this")
    				#case ("/admin/plugin/create")
    					#set(nav7 = "layui-nav-itemed")
    					#set(nav72 = "layui-this")
    				#case ("/admin/plugin/edit")
    					#set(nav7 = "layui-nav-itemed")
    					#set(nav73 = "layui-this")
    				#case ("/admin/user")
    					#set(nav8 = "layui-nav-itemed")
    					#set(nav81 = "layui-this")
    				#case ("/admin/user/create")
    					#set(nav8 = "layui-nav-itemed")
    					#set(nav82 = "layui-this")
    				#case ("/admin/profile")
    					#set(nav8 = "layui-nav-itemed")
    					#set(nav83 = "layui-this")
    				#case ("/admin/tools")
    					#set(nav9 = "layui-nav-itemed")
    					#set(nav91 = "layui-this")
    				#case ("/admin/tools/import")
    					#set(nav9 = "layui-nav-itemed")
    					#set(nav92 = "layui-this")
    				#case ("/admin/tools/export")
    					#set(nav9 = "layui-nav-itemed")
    					#set(nav93 = "layui-this")
    				#case ("/admin/tools/export_personal_data")
    					#set(nav9 = "layui-nav-itemed")
    					#set(nav94 = "layui-this")
    				#case ("/admin/tools/remove_personal_data")
    					#set(nav9 = "layui-nav-itemed")
    					#set(nav95 = "layui-this")
    				#case ("/admin/option/general")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav01 = "layui-this")
    				#case ("/admin/option/writing")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav02 = "layui-this")
    				#case ("/admin/option/reading")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav03 = "layui-this")
    				#case ("/admin/option/discussion")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav04 = "layui-this")
    				#case ("/admin/option/media")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav05 = "layui-this")
    				#case ("/admin/option/permalink")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav06 = "layui-this")
    				#case ("/admin/option/privacy")
    					#set(nav0 = "layui-nav-itemed")
    					#set(nav07 = "layui-this")
    				#default
    					#set(nav1 = "layui-nav-itemed")
    					#set(nav11 = "layui-this")
    			#end
      			<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      			<ul class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="nav">
        			<li class="layui-nav-item #(nav1)">
          				<a class="" href="javascript:;"><i class="layui-icon layui-icon-console"></i>仪表盘</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav11)"><a href="/admin">首页</a></dd>
            				<dd class="#(nav12)"><a href="javascript:;">更新</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav2)">
          				<a class="" href="javascript:;"><i class="layui-icon layui-icon-note"></i>文章</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav21)"><a href="/admin/post">所有文章</a></dd>
            				<dd class="#(nav22)"><a href="/admin/post/create">写文章</a></dd>
            				<dd class="#(nav23)"><a href="/admin/category">分类目录</a></dd>
            				<dd class="#(nav24)"><a href="/admin/tag">标签</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav3)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-camera"></i>媒体</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav31)"><a href="/admin/attachment">媒体库</a></dd>
            				<dd class="#(nav32)"><a href="/admin/attachment/create">添加新文件</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav4)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-file"></i>页面</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav41)"><a href="/admin/page">所有页面</a></dd>
            				<dd class="#(nav42)"><a href="/admin/page/create">新建页面</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav5)"><a href="/admin/comment"><i class="layui-icon layui-icon-chat"></i>评论</a></li>
        			<li class="layui-nav-item #(nav6)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-theme"></i>外观</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav61)"><a href="/admin/theme">主题</a></dd>
            				<dd class="#(nav62)"><a href="javascript:;">自定义</a></dd>
            				<dd class="#(nav63)"><a href="javascript:;">小工具</a></dd>
            				<dd class="#(nav64)"><a href="/admin/menu">菜单</a></dd>
            				<dd class="#(nav65)"><a href="javascript:;">顶部</a></dd>
            				<dd class="#(nav66)"><a href="javascript:;">编辑</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav7)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-component"></i>插件</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav71)"><a href="/admin/plugin">已安装的插件</a></dd>
            				<dd class="#(nav72)"><a href="javascript:;">安装插件</a></dd>
            				<dd class="#(nav73)"><a href="javascript:;">编辑</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav8)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-user"></i>用户</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav81)"><a href="/admin/user">所有用户</a></dd>
            				<dd class="#(nav82)"><a href="/admin/user/create">添加用户</a></dd>
            				<dd class="#(nav83)"><a href="/admin/profile">我的个人资料</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav9)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-util"></i>工具</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav91)"><a href="javascript:;">可用工具</a></dd>
            				<dd class="#(nav92)"><a href="javascript:;">导入</a></dd>
            				<dd class="#(nav93)"><a href="javascript:;">导出</a></dd>
            				<dd class="#(nav94)"><a href="javascript:;">导出个人数据</a></dd>
            				<dd class="#(nav95)"><a href="javascript:;">抹除个人数据</a></dd>
          				</dl>
        			</li>
        			<li class="layui-nav-item #(nav0)">
          				<a href="javascript:;"><i class="layui-icon layui-icon-set"></i>设置</a>
          				<dl class="layui-nav-child">
            				<dd class="#(nav01)"><a href="/admin/option/general">常规</a></dd>
            				<dd class="#(nav02)"><a href="/admin/option/writing">撰写</a></dd>
            				<dd class="#(nav03)"><a href="/admin/option/reading">阅读</a></dd>
            				<dd class="#(nav04)"><a href="/admin/option/discussion">讨论</a></dd>
            				<dd class="#(nav05)"><a href="/admin/option/media">媒体</a></dd>
            				<dd class="#(nav06)"><a href="/admin/option/permalink">固定链接</a></dd>
            				<dd class="#(nav07)"><a href="/admin/option/privacy">隐私</a></dd>
          				</dl>
        			</li>
      			</ul>
      			<div id="collapse-menu"><i class="layui-icon layui-icon-shrink-right"></i>收起菜单</div>
    		</div>
  		</div>
  
  		<div class="layui-body">
    		<!-- 内容主体区域 -->
    		#@body()
  		</div>
  
  		<div class="layui-footer">
    		<!-- 底部固定区域 -->
    		&copy; tbynet.com - 感谢使用Jwp进行创作。
  		</div>
	</div>
	<script src="/assets/layui/layui.js"></script>
	<script>
	layui.cache.user = {
		username: '游客' 
		,uid: -1 
		,avatar: '' 
		,experience: 0 
		,sum: 0 
		,vip: 0 
		,sex: ''
	};
	layui.cache.base = '/assets/tbynet/admin/'; //静态资源所在路径
	layui.config({
		version: true
  	}).extend({
  		'tbynet': '{/}/assets/tbynet/tbynet'
  	});
	
	layui.use('tbynet', function(){
		var $ = layui.$
		,element = layui.element;
		
		var nav = $('.layui-nav-itemed');
		element.on('nav(nav)', function(elem){
			nav = $(elem).closest('.layui-nav-itemed');
			$("body").removeClass("collapse-menu");
            $('#collapse-menu').html('<i class="layui-icon layui-icon-shrink-right"></i>收起菜单');
		});
		
		//左侧导航栏收缩功能
		$('#collapse-menu').click(function(){
			if ($("body").hasClass("collapse-menu")) {
                $("body").removeClass("collapse-menu");
                $(this).html('<i class="layui-icon layui-icon-shrink-right"></i>收起菜单');
                $(nav).addClass('layui-nav-itemed');
            } else {
                $("body").addClass("collapse-menu");
                $(this).html('<i class="layui-icon layui-icon-spread-left"></i>');
                $(this).attr('title', '展开菜单');
                $(nav).removeClass('layui-nav-itemed');
            }	
		});
    	
    	element.on('collapse(menu1)', function(data){
    		$('.menu1 .layui-colla-title').css('background-color', '#fff');
   		  	$(data.title).css('background-color', '#f2f2f2');
   		});
    	
    	element.on('collapse(menu2)', function(data){
    		if(data.show) {
    			$(data.title).css('background-color', '#f2f2f2');
    		} else {
    			$(data.title).css('background-color', '#fff');
    		}
   		});
	});
	</script>
	#@foot?()
</body>
</html>
#end